from selenium import webdriver


class WebDriver:
    __driver = None

    @classmethod
    def get_driver(cls):
        if cls.__driver is None:
            cls.__driver = webdriver.Chrome()
            cls.__driver.maximize_window()
        return cls.__driver

    @classmethod
    def quit_driver(cls):
        if cls.__driver is not None:
            cls.__driver.close()

if __name__ == '__main__':
    d1 = WebDriver.get_driver()
    d2 = WebDriver.get_driver()
    print(id(d1))
    print(id(d2))